<route lang="json5" type="page">
{
  layout: 'demo',
  style: {
    navigationBarTitleText: '详情',
  },
}
</route>

<template>
  <view class="pb-12">
    <CardComp></CardComp>
    <view v-for="comment in data" :key="comment.id">
      <CommentComp :comment="comment"></CommentComp>
    </view>
  </view>
</template>

<script lang="ts" setup>
import { CommentVO, getCommentListAPI } from '@/service/comment/comment'
import CardComp from './components/card.vue'
import CommentComp from './components/comment.vue'
const data = ref<CommentVO>()
onLoad(async (options) => {
  const res = await getCommentListAPI(options.id)
  data.value = res.result
})
</script>

<style lang="scss" scoped>
//
</style>
